﻿<%@ page language="java" pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt" %>
<%@ taglib uri="http://www.ebayAdmin.com/rbac" prefix="rbac" %>
<%@ taglib uri="/WEB-INF/struts-html" prefix="html" %>
<%@ taglib uri="/WEB-INF/struts-bean" prefix="bean" %>
<%@ taglib prefix="s" uri="/struts-tags" %>
<%request.setAttribute("ctx",request.getContextPath()); %>
<html>
<head>
<link href="${ctx}/extend/css/style.css" rel="stylesheet" type="text/css"/>
<script src="${ctx}/extend/js/jquery/jquery.js" type="text/javascript"></script>
<script src="${ctx}/extend/js/dutil/DUtil.js" type="text/javascript"></script>
<script src="${ctx}/extend/css/css.js" type="text/javascript"></script>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
<link href="${ctx}/css/style.css" rel="stylesheet" type="text/css"/>
<script src="${ctx}/js/common.js" type="text/javascript"></script>
<script src="${ctx}/js/check.js" type="text/javascript"></script>
<script src="${ctx}/js/utils.js" type="text/javascript"></script>
<script src="${ctx}/js/common/merdiseSort.js" type="text/javascript"></script>
<%-- <script src="${ctx}/js/checker.js" type="text/javascript"></script> --%>
<title>添加新资产</title>

</head>


<body class="maintable">
<form name="merchandiseForm" method="POST" id="modifyReForm" action="saveRecord" enctype="multipart/form-data">
<div id="div_all_document" style="height:100%;overflow-y:auto;position:relative;word-wrap: break-word; word-break: break-all;">
<div class="dclass_container" >
	<div class="dclass_container_header" >    	
        <div class="dclass_container_title">修改资产记录 -- 序号：${reVO.sequenceNum}</div>
    </div>
    
    <div class="dclass_container_content">
  	<input type="hidden" id="sequenceNum" name="reMd.sequenceNum" value="${reVO.sequenceNum}">

	<table width="100%" border="0" cellpadding="0" cellspacing="1" bgcolor="#9FD6FF">
         <tr>           
			<td width="20%" class="formtitle">资产号:</td>
			<%-- <rbac:hasPermission permStr="/admin/editPart2">
           		<td width="30%" class="formtd"><input name="reMd.assetsNum" id="assetsNum" type="text" class="inputform" value="${reVO.assetsNum}"></td>
			</rbac:hasPermission>
			<rbac:hasPermission permStr="/admin/readPart2"> --%>				
           		<td width="30%" class="formtd">
           		<input name="reMd.assetsNum" id="assetsNum" class="inputform" value="${reVO.assetsNum}" type="hidden"/>
           		${reVO.assetsNum}
           		</td>
			<%-- </rbac:hasPermission> --%>
			<td width="20%" class="formtitle"></td>
           	<td width="30%" class="formtd"></td>
		</tr>
         <tr>           
			<td width="20%" class="formtitle">自编号:</td>
			<rbac:hasPermission permStr="/admin/editPart2">
           		<td width="30%" class="formtd"><input name="reMd.selfNum" id="selfNum" type="text" class="inputform" value="${reVO.selfNum}"></td>
			</rbac:hasPermission>
			<rbac:hasPermission permStr="/admin/readPart2">
           		<td width="30%" class="formtd">
           		<input name="reMd.selfNum" id="selfNum" type="hidden" class="inputform" value="${reVO.selfNum}">
           		${reVO.selfNum}
           		</td>
			</rbac:hasPermission>
            <td width="20%" class="formtitle">公司名称:</td>
			<rbac:hasPermission permStr="/admin/editPart2">
           		<td width="30%" class="formtd"> <input name="reMd.compName" id="compName" type="text" class="inputform" value="${reVO.compName}"></td>
			</rbac:hasPermission>
			<rbac:hasPermission permStr="/admin/readPart2">
           		<td width="30%" class="formtd">
           		<input name="reMd.compName" id="compName" type="hidden" class="inputform" value="${reVO.compName}">
           		${reVO.compName}
           		</td>
			</rbac:hasPermission>
          </tr>
          <tr>           
			<td width="20%" class="formtitle">业务类型:</td>
			<rbac:hasPermission permStr="/admin/editPart2">
            	<td width="30%" class="formtd"><input name="reMd.busType" id="busType" type="text" class="inputform" value="${reVO.busType}"></td>
			</rbac:hasPermission>
			<rbac:hasPermission permStr="/admin/readPart2">
            	<td width="30%" class="formtd">
            	<input name="reMd.busType" id="busType" type="hidden" class="inputform" value="${reVO.busType}">
            	${reVO.busType}
            	</td>
			</rbac:hasPermission>
            <td width="20%" class="formtitle">项目/工程号:</td>
			<rbac:hasPermission permStr="/admin/editPart2">
            	<td width="30%" class="formtd"> <input name="reMd.projNum" id="projNum" type="text" class="inputform" value="${reVO.projNum}"></td>
			</rbac:hasPermission>
			<rbac:hasPermission permStr="/admin/readPart2">
            	<td width="30%" class="formtd"><input name="reMd.projNum" id="projNum" type="hidden" class="inputform" value="${reVO.projNum}">
            	${reVO.projNum}
            	</td>
			</rbac:hasPermission>
          </tr>
          <tr>           
			<td width="20%" class="formtitle">项目/工程名称:</td>
			<rbac:hasPermission permStr="/admin/editPart2">
            <td width="30%" class="formtd"><input name="reMd.projName" id="projName" type="text" class="inputform" value="${reVO.projName}"></td>
			</rbac:hasPermission>
			<rbac:hasPermission permStr="/admin/readPart2">
            	<td width="30%" class="formtd">
            	<input name="reMd.projName" id="projName" type="hidden" class="inputform" value="${reVO.projName}">
            	${reVO.projName}
            	</td>
			</rbac:hasPermission>
            <td width="20%" class="formtitle">资产类型:</td>
            <td class="formtd">
				<rbac:hasPermission permStr="/admin/editPart2">
					<select name="reMd.prodType" >
						<option value="">请选择</option>
						<c:forEach var="cvar"  items="${prodType}">
							<c:if test="${reVO.prodType==cvar.key}">
								<option value="${cvar.key}" selected="selected">${cvar.value}</option>
							</c:if>
							<c:if test="${reVO.prodType!=cvar.key}">
								<option value="${cvar.key}">${cvar.value}</option>
							</c:if>
						</c:forEach>
					</select>
				</rbac:hasPermission>
				<rbac:hasPermission permStr="/admin/readPart2">
            		<input name="reMd.prodType" id="prodType" type="hidden" class="inputform" value="${reVO.prodType}">
        			<s:if test="reVO.prodType ==1">固定资产</s:if>
        			<s:if test="reVO.prodType ==2">耗材</s:if>
				</rbac:hasPermission>
			</td>
          </tr>
          <tr>           
			<td width="20%" class="formtitle">资产分类:</td>
			<td class="formtd">
				<rbac:hasPermission permStr="/admin/editPart2">
					<select name="reMd.prodClass" >
						<option value="">请选择</option>
						<c:forEach var="cvar" items="${prodClass}">
							<c:if test="${reVO.prodClass==cvar.key}">
								<option value="${cvar.key}" selected="selected">${cvar.value}</option>
							</c:if>
							<c:if test="${reVO.prodClass!=cvar.key}">
								<option value="${cvar.key}">${cvar.value}</option>
							</c:if>
						</c:forEach>
					</select>
				</rbac:hasPermission>
				<rbac:hasPermission permStr="/admin/readPart2">
            		<input name="reMd.prodClass" id="prodClass" type="hidden" class="inputform" value="${reVO.prodClass}">
        			<s:if test="reVO.prodClass ==1">设备</s:if>
        		    <s:if test="reVO.prodClass ==2">光缆</s:if>
        			<s:if test="reVO.prodClass ==3">其他</s:if>
				</rbac:hasPermission>
			</td>
			<td width="20%" class="formtitle">设备分类:</td>
				<%-- <rbac:hasPermission permStr="/admin/editPart2">
					<select name="reMd.equipClass" >
						<c:forEach var="cvar"  items="${equipClass}">
							<option value="${cvar.key}">${cvar.value}</option>
						</c:forEach>
					</select>
				</rbac:hasPermission>
				<rbac:hasPermission permStr="/admin/readPart2">
        			<s:if test="reVO.equipClass ==1">网络设备</s:if>
        		    <s:if test="reVO.equipClass ==2">辅助设备</s:if>
        			<s:if test="reVO.equipClass ==3">其他</s:if>
				</rbac:hasPermission> --%>
				
				<!-- Revised by Doug on Oct19 to remove the drapdown of equipClass -->
				<rbac:hasPermission permStr="/admin/editPart2">
					<td width="30%" class="formtd"> <input name="reMd.equipClass" id="equipClass" type="text" class="inputform" value="${reVO.equipClass}"></td>
				</rbac:hasPermission>
				<rbac:hasPermission permStr="/admin/readPart2">
					<!-- Revised by Doug on Oct19 to remove the drapdown of equipClass -->
        			<%-- <s:if test="reVO.equipClass ==1">网络设备</s:if>
        		    <s:if test="reVO.equipClass ==2">辅助设备</s:if>
        			<s:if test="reVO.equipClass ==3">其他</s:if> --%>
        			<td width="30%" class="formtd"><input name="reMd.equipClass" id="equipClass" type="hidden" class="inputform" value="${reVO.equipClass}">${reVO.equipClass}</td>
				</rbac:hasPermission>
          </tr>
          <tr>           
			<td width="20%" class="formtitle">设备类型:</td>
  			<rbac:hasPermission permStr="/admin/editPart2">
           		<td width="30%" class="formtd"><input name="reMd.equipType" id="equipType" type="text" class="inputform" value="${reVO.equipType}"></td>
			</rbac:hasPermission>
			<rbac:hasPermission permStr="/admin/readPart2">
           		<td width="30%" class="formtd"><input name="reMd.equipType" id="equipType" type="hidden" class="inputform" value="${reVO.equipType}">${reVO.equipType}</td>
			</rbac:hasPermission>
            <td width="20%" class="formtitle">设备名称:</td>
  			<rbac:hasPermission permStr="/admin/editPart2">
            	<td width="30%" class="formtd"> <input name="reMd.equipName" id="equipName" type="text" class="inputform" value="${reVO.equipName}"></td>
			</rbac:hasPermission>
			<rbac:hasPermission permStr="/admin/readPart2">
           		<td width="30%" class="formtd"><input name="reMd.equipName" id="equipName" type="hidden" class="inputform" value="${reVO.equipName}">${reVO.equipName}</td>
			</rbac:hasPermission>
          </tr>
          <tr>            
			<td width="20%" class="formtitle">设备别名:</td>
  			<rbac:hasPermission permStr="/admin/editPart2">
            	<td width="30%" class="formtd"><input name="reMd.equipNickName" id="equipNickName" type="text" class="inputform" value="${reVO.equipNickName}"></td>
			</rbac:hasPermission>
			<rbac:hasPermission permStr="/admin/readPart2">
            	<td width="30%" class="formtd"><input name="reMd.equipNickName" id="equipNickName" type="hidden" class="inputform" value="${reVO.equipNickName}">${reVO.equipNickName}</td>
			</rbac:hasPermission>
            <td width="20%" class="formtitle">光缆类型:</td>
            <td class="formtd">
  				<rbac:hasPermission permStr="/admin/editPart2">
					<select name="reMd.fiberType">
						<option value="">请选择</option>
						<c:forEach var="cvar"  items="${fiberType}">
							<c:if test="${reVO.fiberType==cvar.key}">
								<option value="${cvar.key}" selected="selected">${cvar.value}</option>
							</c:if>
							<c:if test="${reVO.fiberType!=cvar.key}">
								<option value="${cvar.key}">${cvar.value}</option>
							</c:if>
						</c:forEach>
						
					</select>
				</rbac:hasPermission>
				<rbac:hasPermission permStr="/admin/readPart2">
            		<input name="reMd.fiberType" id="fiberType" type="hidden" class="inputform" value="${reVO.fiberType}">
        			<s:if test="reVO.fiberType ==1">主干光缆</s:if>
        		    <s:if test="reVO.fiberType ==2">引接光缆</s:if>
        			<s:if test="reVO.fiberType ==3">分支光缆</s:if>
        			<s:if test="reVO.fiberType ==4">其他</s:if>
				</rbac:hasPermission>
			</td>
          </tr>
			
          <tr>           
            <td width="20%" class="formtitle">光缆芯数:<span>(正整数)</span></td>
  			<rbac:hasPermission permStr="/admin/editPart2">
            	<td width="30%" class="formtd"> <input name="reMd.fiberNum" id="fiberNum" type="text" class="inputform" value="${reVO.fiberNum}" ></td>
			</rbac:hasPermission>
			<rbac:hasPermission permStr="/admin/readPart2">
            	<td width="30%" class="formtd">
            	<input name="reMd.fiberNum" id="fiberNum" type="hidden" class="inputform" value="${reVO.fiberNum}" >
            	${reVO.fiberNum}
            	</td>
			</rbac:hasPermission>
			<td width="20%" class="formtitle">光缆长度:<span>(正整数)</span></td>
  			<rbac:hasPermission permStr="/admin/editPart2">
            	<td width="30%" class="formtd"><input name="reMd.fiberLength" id="fiberLength" type="text" class="inputform" value="${reVO.fiberLength}"></td>
			</rbac:hasPermission>
			<rbac:hasPermission permStr="/admin/readPart2">
            	<td width="30%" class="formtd">
            	<input name="reMd.fiberLength" id="fiberLength" type="hidden" class="inputform" value="${reVO.fiberLength}">
            	${reVO.fiberLength}
            	</td>
			</rbac:hasPermission>
          </tr>
          <tr>           
            <td width="20%" class="formtitle">厂家名:</td>
  			<rbac:hasPermission permStr="/admin/editPart2">
            	<td width="30%" class="formtd"> <input name="reMd.factoryName" id="factoryName" type="text" class="inputform" value="${reVO.factoryName}" ></td>
			</rbac:hasPermission>
			<rbac:hasPermission permStr="/admin/readPart2">
            	<td width="30%" class="formtd">
            	<input name="reMd.factoryName" id="factoryName" type="hidden" class="inputform" value="${reVO.factoryName}" >
            	${reVO.factoryName}
            	</td>
			</rbac:hasPermission>
			<td width="20%" class="formtitle">供货商:</td>
  			<rbac:hasPermission permStr="/admin/editPart2">
            	<td width="30%" class="formtd"><input name="reMd.provider" id="provider" type="text" class="inputform" value="${reVO.provider}"></td>
			</rbac:hasPermission>
			<rbac:hasPermission permStr="/admin/readPart2">
            	<td width="30%" class="formtd">
            	<input name="reMd.provider" id="provider" type="hidden" class="inputform" value="${reVO.provider}">
            	${reVO.provider}
            	</td>
			</rbac:hasPermission>
          </tr>
          <tr>           
            <td width="20%" class="formtitle">设备型号:</td>
  			<rbac:hasPermission permStr="/admin/editPart2">
            	<td width="30%" class="formtd"> <input name="reMd.equipModel" id="equipModel" type="text" class="inputform" value="${reVO.equipModel}" ></td>
			</rbac:hasPermission>
			<rbac:hasPermission permStr="/admin/readPart2">
            	<td width="30%" class="formtd">
            	<input name="reMd.equipModel" id="equipModel" type="hidden" class="inputform" value="${reVO.equipModel}" >
            	${reVO.equipModel}
            	</td>
			</rbac:hasPermission>
			<td width="20%" class="formtitle">S/N:</td>
  			<%-- <rbac:hasPermission permStr="/admin/editPart2">
            	<td width="30%" class="formtd"><input name="reMd.sn" id="sn" type="text" class="inputform" value="${reVO.sn}"></td>
			</rbac:hasPermission>
			<rbac:hasPermission permStr="/admin/readPart2"> --%>
            	<td width="30%" class="formtd">
            	<input name="reMd.sn" id="sn" type="hidden" class="inputform" value="${reVO.sn}">
            	${reVO.sn}
            	</td>
			<%-- </rbac:hasPermission> --%>
          </tr>
          <tr>
          	<td width="20%" class="formtitle">MAC:</td>
  			<rbac:hasPermission permStr="/admin/editPart2">
            	<td width="30%" class="formtd"><input name="reMd.macAddr" id="macAddr" type="text" class="inputform" value="${reVO.macAddr}"></td>
			</rbac:hasPermission>
			<rbac:hasPermission permStr="/admin/readPart2">
            	<td width="30%" class="formtd">
            	<input name="reMd.macAddr" id="macAddr" type="hidden" class="inputform" value="${reVO.macAddr}">
            	${reVO.macAddr}
            	</td>
			</rbac:hasPermission>
            <td width="20%" class="formtitle">模块号:</td>
  			<rbac:hasPermission permStr="/admin/editPart2">
            	<td width="30%" class="formtd"> <input name="reMd.modelNum" id="modelNum" type="text" class="inputform" value="${reVO.modelNum}" ></td>
			</rbac:hasPermission>
			<rbac:hasPermission permStr="/admin/readPart2">
            	<td width="30%" class="formtd">
            	<input name="reMd.modelNum" id="modelNum" type="hidden" class="inputform" value="${reVO.modelNum}" >
            	${reVO.modelNum}
            	</td>
			</rbac:hasPermission>
          </tr>
          <tr>          	
			<td width="20%" class="formtitle">规格:</td>
  			<rbac:hasPermission permStr="/admin/editPart2">
            	<td width="30%" class="formtd"><input name="reMd.standard" id="standard" type="text" class="inputform" value="${reVO.standard}"></td>
			</rbac:hasPermission>
			<rbac:hasPermission permStr="/admin/readPart2">
            	<td width="30%" class="formtd">
            	<input name="reMd.standard" id="standard" type="hidden" class="inputform" value="${reVO.standard}">
            	${reVO.standard}
            	</td>
			</rbac:hasPermission>
            <td width="20%" class="formtitle">
            <rbac:hasPermission permStr="/admin/price">
            	单价:<span>(正数)</span>
            </rbac:hasPermission>
            </td>
            <td width="30%" class="formtd">
            	<%-- <input name="reMd.unitPrice" id="unitPrice" type="hidden" class="inputform" value="${reVO.unitPrice}" > --%>
  			<rbac:hasPermission permStr="/admin/price">
            	<input name="reMd.unitPrice" id="unitPrice" type="text" class="inputform" value="${reVO.unitPrice}" >
			</rbac:hasPermission>
			</td>
			<%-- <rbac:hasPermission permStr="/admin/readPart2">
            	<td width="30%" class="formtd">${reVO.unitPrice}</td>
			</rbac:hasPermission>
			--%>
          </tr>
          <tr>          	
			<td width="20%" class="formtitle">入库日期:<span>(yyyy-MM-dd)</span></td>
  			<rbac:hasPermission permStr="/admin/editPart2">
            	<td width="30%" class="formtd"><input name="reMd.inputDate" id="inputDate" type="text" class="inputform" value="${reVO.inputDate}" readOnly="readonly"></td>
			</rbac:hasPermission>
			<rbac:hasPermission permStr="/admin/readPart2">
            	<td width="30%" class="formtd">
            	<input name="reMd.inputDate" id="inputDate" type="hidden" class="inputform" value="${reVO.inputDate}">
            	${reVO.inputDate}
            	</td>
			</rbac:hasPermission>
            <td width="20%" class="formtitle">出库日期:<span>(yyyy-MM-dd)</span></td>
  			<rbac:hasPermission permStr="/admin/editPart2">
            	<td width="30%" class="formtd"> <input name="reMd.manDate" id="manDate" type="text" class="inputform" value="${reVO.manDate}" ></td>
			</rbac:hasPermission>
			<rbac:hasPermission permStr="/admin/readPart2">
            	<td width="30%" class="formtd">
            	<input name="reMd.manDate" id="manDate" type="hidden" class="inputform" value="${reVO.manDate}" >
            	${reVO.manDate}
            	</td>
			</rbac:hasPermission>
          </tr>
     
          <tr>
			<td width="20%" class="formtitle">仓库管理人:</td>
			<rbac:hasPermission permStr="/admin/editPart1">
				<td width="30%" class="formtd">
				<input name="reMd.wareHouseMan" id="wareHouseMan" type="text" class="inputform" value="${reVO.wareHouseMan}">
				</td>
			</rbac:hasPermission> 			
 			<rbac:hasPermission permStr="/admin/readPart1">
 			<td width="30%" class="formtd">
 				<input name="reMd.wareHouseMan" id="wareHouseMan" type="hidden" class="inputform" value="${reVO.wareHouseMan}">
       			${reVO.wareHouseMan}
       		</td>
       		</rbac:hasPermission>
       		
            <td width="20%" class="formtitle">使用日期:<span>(yyyy-MM-dd)</span></td>
  			<rbac:hasPermission permStr="/admin/editPart1">
            	<td width="30%" class="formtd"> <input name="reMd.useDate" id="useDate" type="text" class="inputform" value="${reVO.useDate}" ></td>
			</rbac:hasPermission>
			<rbac:hasPermission permStr="/admin/readPart1">
				<td width="30%" class="formtd">
				<input name="reMd.useDate" id="useDate" type="hidden" class="inputform" value="${reVO.useDate}" >
				${reVO.useDate}
				</td>
			</rbac:hasPermission>
          </tr>
          <tr>
			<td width="20%" class="formtitle">负责人:</td>
  			<rbac:hasPermission permStr="/admin/editPart1">
            <td width="30%" class="formtd"><input name="reMd.chargeMan" id="chargeMan" type="text" class="inputform" value="${reVO.chargeMan}"></td>
			</rbac:hasPermission>
			<rbac:hasPermission permStr="/admin/readPart1">
           		<td width="30%" class="formtd">
           		<input name="reMd.chargeMan" id="chargeMan" type="hidden" class="inputform" value="${reVO.chargeMan}">
           		${reVO.chargeMan}
           		</td>
			</rbac:hasPermission>
            <td width="20%" class="formtitle">资产管理人:</td>
  			<rbac:hasPermission permStr="/admin/editPart1">
            <td width="30%" class="formtd"> <input name="reMd.assetsMgnt" id="assetsMgnt" type="text" class="inputform" value="${reVO.assetsMgnt}" ></td>
			</rbac:hasPermission>
			<rbac:hasPermission permStr="/admin/readPart1">
           		<td width="30%" class="formtd">
           		<input name="reMd.assetsMgnt" id="assetsMgnt" type="hidden" class="inputform" value="${reVO.assetsMgnt}" >
           		${reVO.assetsMgnt}
           		</td>
			</rbac:hasPermission>
          </tr>
           <tr>
			<td width="20%" class="formtitle">设备所在省:</td>
  			<rbac:hasPermission permStr="/admin/editPart1">
            <td width="30%" class="formtd"><input name="reMd.equipLocalProvice" id="equipLocalProvice" type="text" class="inputform" value="${reVO.equipLocalProvice}"></td>
			</rbac:hasPermission>
			<rbac:hasPermission permStr="/admin/readPart1">
           		<td width="30%" class="formtd">
           		<input name="reMd.equipLocalProvice" id="equipLocalProvice" type="hidden" class="inputform" value="${reVO.equipLocalProvice}">
           		${reVO.equipLocalProvice}
           		</td>
			</rbac:hasPermission>
            <td width="20%" class="formtitle">设备所在市:</td>
  			<rbac:hasPermission permStr="/admin/editPart1">
            <td width="30%" class="formtd"> <input name="reMd.equipLocalCity" id="equipLocalCity" type="text" class="inputform" value="${reVO.equipLocalCity}" ></td>
			</rbac:hasPermission>
			<rbac:hasPermission permStr="/admin/readPart1">
           		<td width="30%" class="formtd">
           		<input name="reMd.equipLocalCity" id="equipLocalCity" type="hidden" class="inputform" value="${reVO.equipLocalCity}" >
           		${reVO.equipLocalCity}
           		</td>
			</rbac:hasPermission>
          </tr>
          <tr>
			<td width="20%" class="formtitle">设备所在区:</td>
  			<rbac:hasPermission permStr="/admin/editPart1">
            <td width="30%" class="formtd"><input name="reMd.equipLocalDistrict" id="equipLocalDistrict" type="text" class="inputform" value="${reVO.equipLocalDistrict}"></td>
			</rbac:hasPermission>
			<rbac:hasPermission permStr="/admin/readPart1">
           		<td width="30%" class="formtd">
           		<input name="reMd.equipLocalDistrict" id="equipLocalDistrict" type="hidden" class="inputform" value="${reVO.equipLocalDistrict}">
           		${reVO.equipLocalDistrict}
           		</td>
			</rbac:hasPermission>
            <td width="20%" class="formtitle">设备所在村镇:</td>
  			<rbac:hasPermission permStr="/admin/editPart1">
            <td width="30%" class="formtd"> <input name="reMd.equipLocalTown" id="equipLocalTown" type="text" class="inputform" value="${reVO.equipLocalTown}" ></td>
			</rbac:hasPermission>
			<rbac:hasPermission permStr="/admin/readPart1">
           		<td width="30%" class="formtd">
           		<input name="reMd.equipLocalTown" id="equipLocalTown" type="hidden" class="inputform" value="${reVO.equipLocalTown}" >
           		${reVO.equipLocalTown}
           		</td>
			</rbac:hasPermission>
          </tr>
          <tr>
			<td width="20%" class="formtitle">光缆起点:</td>
  			<rbac:hasPermission permStr="/admin/editPart2">
            <td width="30%" class="formtd"><input name="reMd.fiberStart" id="fiberStart" type="text" class="inputform" value="${reVO.fiberStart}"></td>
			</rbac:hasPermission>
			<rbac:hasPermission permStr="/admin/readPart2">
            <td width="30%" class="formtd">
            <input name="reMd.fiberStart" id="fiberStart" type="hidden" class="inputform" value="${reVO.fiberStart}">
            ${reVO.fiberStart}
            </td>
			</rbac:hasPermission>
            <td width="20%" class="formtitle">光缆终点:</td>
  			<rbac:hasPermission permStr="/admin/editPart2">
            <td width="30%" class="formtd"> <input name="reMd.fiberEnd" id="fiberEnd" type="text" class="inputform" value="${reVO.fiberEnd}" ></td>
			</rbac:hasPermission>
			<rbac:hasPermission permStr="/admin/readPart2">
            <td width="30%" class="formtd">
            <input name="reMd.fiberEnd" id="fiberEnd" type="hidden" class="inputform" value="${reVO.fiberEnd}" >
            ${reVO.fiberEnd}
            </td>
			</rbac:hasPermission>
          </tr>
          <tr>
			<td width="20%" class="formtitle">光缆起始码号:</td>
  			<rbac:hasPermission permStr="/admin/editPart2">
            <td width="30%" class="formtd"><input name="reMd.fiberStartCode" id="fiberStartCode" type="text" class="inputform" value="${reVO.fiberStartCode}"></td>
			</rbac:hasPermission>
			<rbac:hasPermission permStr="/admin/readPart2">
            <td width="30%" class="formtd">
            <input name="reMd.fiberStartCode" id="fiberStartCode" type="hidden" class="inputform" value="${reVO.fiberStartCode}">
            ${reVO.fiberStartCode}
            </td>
			</rbac:hasPermission>
            <td width="20%" class="formtitle">光缆终止码号:</td>
  			<rbac:hasPermission permStr="/admin/editPart2">
            <td width="30%" class="formtd"> <input name="reMd.fiberEndCode" id="fiberEndCode" type="text" class="inputform" value="${reVO.fiberEndCode}" ></td>
			</rbac:hasPermission>
			<rbac:hasPermission permStr="/admin/readPart2">
            <td width="30%" class="formtd">
            <input name="reMd.fiberEndCode" id="fiberEndCode" type="hidden" class="inputform" value="${reVO.fiberEndCode}" >
            ${reVO.fiberEndCode}
            </td>
			</rbac:hasPermission>
          </tr>
          <tr>
			<td width="20%" class="formtitle">具体位置:</td>
  			<rbac:hasPermission permStr="/admin/editPart1">
            <td width="30%" class="formtd"><input name="reMd.exactLocation" id="exactLocation" type="text" class="inputform" value="${reVO.exactLocation}"></td>
			</rbac:hasPermission>
			<rbac:hasPermission permStr="/admin/readPart1">
           		<td width="30%" class="formtd">
           		<input name="reMd.exactLocation" id="exactLocation" type="hidden" class="inputform" value="${reVO.exactLocation}">
           		${reVO.exactLocation}
           		</td>
			</rbac:hasPermission>
            <td width="20%" class="formtitle">所属机架:</td>
  			<rbac:hasPermission permStr="/admin/editPart1">
            <td width="30%" class="formtd"> <input name="reMd.belongFrame" id="belongFrame" type="text" class="inputform" value="${reVO.belongFrame}" ></td>
			</rbac:hasPermission>
			<rbac:hasPermission permStr="/admin/readPart1">
           		<td width="30%" class="formtd">
           		<input name="reMd.belongFrame" id="belongFrame" type="hidden" class="inputform" value="${reVO.belongFrame}" >
           		${reVO.belongFrame}
           		</td>
			</rbac:hasPermission>
          </tr>
          <tr>          	
			<td width="20%" class="formtitle">所在机框:</td>
  			<rbac:hasPermission permStr="/admin/editPart1">
            <td width="30%" class="formtd"><input name="reMd.localFrame" id="localFrame" type="text" class="inputform" value="${reVO.localFrame}"></td>
			</rbac:hasPermission>
			<rbac:hasPermission permStr="/admin/readPart1">
           		<td width="30%" class="formtd">
           		<input name="reMd.localFrame" id="localFrame" type="hidden" class="inputform" value="${reVO.localFrame}">
           		${reVO.localFrame}
           		</td>
			</rbac:hasPermission>
            <td width="20%" class="formtitle">所在槽道:</td>
  			<rbac:hasPermission permStr="/admin/editPart1">
            <td width="30%" class="formtd"> <input name="reMd.localChannel" id="localChannel" type="text" class="inputform" value="${reVO.localChannel}" ></td>
			</rbac:hasPermission>
			<rbac:hasPermission permStr="/admin/readPart1">
           		<td width="30%" class="formtd">
           		<input name="reMd.localChannel" id="localChannel" type="hidden" class="inputform" value="${reVO.localChannel}" >
           		${reVO.localChannel}
           		</td>
			</rbac:hasPermission>
          </tr>
          <tr>           
           <%--  <td width="20%" class="formtitle">IP 地址:</td>
  			<rbac:hasPermission permStr="/admin/edit">
            <td width="30%" class="formtd"> <input name="reMd.ip" id="ip" type="text" class="inputform" value="${reVO.ip}" ></td>
			</rbac:hasPermission>
			<rbac:hasPermission permStr="/admin/read">
            <td width="30%" class="formtd"> <input name="reMd.ip" id="ipReadOnly" type="text" class="inputform" value="${reVO.ip}" ></td>
			</rbac:hasPermission> --%>
			<td width="20%" class="formtitle">当前状态:<span class="fontred">*</span></td>
            <td class="formtd">
	  			<rbac:hasPermission permStr="/admin/editPart1">
					<select name="reMd.currStatus" >
						<c:forEach var="cvar"  items="${currStatus}">
							<c:if test="${reVO.currStatus==cvar.key}">
								<option id="currStatus" value="${cvar.key}" selected="selected">${cvar.value}</option>
							</c:if>
							<c:if test="${reVO.currStatus!=cvar.key}">
								<option id="currStatus" value="${cvar.key}">${cvar.value}</option>
							</c:if>
						</c:forEach>
					</select>
				</rbac:hasPermission>
				<rbac:hasPermission permStr="/admin/readPart1">
						<input name="reMd.currStatus" id="currStatus" type="hidden" class="inputform" value="${reVO.currStatus}">
	        			<s:if test="reVO.currStatus ==1">正常使用</s:if>
	        		    <s:if test="reVO.currStatus ==2">故障</s:if>
	        			<s:if test="reVO.currStatus ==3">拆除</s:if>
	        			<s:if test="reVO.currStatus ==4">正在维修</s:if>
	        			<s:if test="reVO.currStatus ==5">库存备用</s:if>
	        			<s:if test="reVO.currStatus ==6">报废</s:if>
	        			<s:if test="reVO.currStatus ==7">借出</s:if>
	        			<s:if test="reVO.currStatus ==8">借入</s:if>
				</rbac:hasPermission>
			</td>
			<td width="20%" class="formtitle">设备功能:</td>
  			<rbac:hasPermission permStr="/admin/editPart1">
            <td width="30%" class="formtd"><input name="reMd.equipFunction" id="equipFunction" type="text" class="inputform" value="${reVO.equipFunction}"></td>
			</rbac:hasPermission>
			<rbac:hasPermission permStr="/admin/readPart1">
           		<td width="30%" class="formtd">
           		<input name="reMd.equipFunction" id="equipFunction" type="hidden" class="inputform" value="${reVO.equipFunction}">
           		${reVO.equipFunction}
           		</td>
			</rbac:hasPermission>
          </tr>
          
          <tr>           
            <td width="20%" class="formtitle">修改日期:<span>(yyyy-MM-dd)</span></td>
  			<rbac:hasPermission permStr="/admin/editPart1">
            <td width="30%" class="formtd"> <input name="reMd.modifyDate" id="modifyDate" type="text" class="inputform" value="${reVO.modifyDate}" readonly="readonly"></td>
			</rbac:hasPermission>
			<rbac:hasPermission permStr="/admin/readPart1">
           		<td width="30%" class="formtd">
           		<input name="reMd.modifyDate" id="modifyDate" type="hidden" class="inputform" value="${reVO.modifyDate}">
           		${reVO.modifyDate}
           		</td>
			</rbac:hasPermission>
			<td width="20%" class="formtitle">修改原因:<span class="fontred">*</span></td>
  			<td width="30%" class="formtd">
  			<rbac:hasPermission permStr="/admin/editPart1">
  				<input name="reMd.modifyResult" id="modifyResult" type="text" class="inputform" value="${reVO.modifyResult}">
			</rbac:hasPermission>
			</td>
			<%-- <rbac:hasPermission permStr="/admin/readPart1">
           		<td width="30%" class="formtd">
           		<input name="reMd.modifyResult" id="modifyResult" type="hidden" class="inputform" value="${reVO.modifyResult}">
           		${reVO.modifyResult}
           		</td>
			</rbac:hasPermission> --%>
          </tr>
          
          <tr>           
            <td width="20%" class="formtitle">备注:</td>
           	<td colspan="3" width="30%" class="formtd">
  			<rbac:hasPermission permStr="/admin/editPart1">
            	<textarea class="inputformtext100" name="reMd.remarks" id="remarks" >${reVO.remarks}</textarea>
			</rbac:hasPermission>
			<rbac:hasPermission permStr="/admin/readPart1">
            	<textarea class="inputformtext100" readonly="readonly" name="reMd.remarks" id="remarksReadOnly" >${reVO.remarks}</textarea>
			</rbac:hasPermission>
           </td>
          </tr> 
     </table>
     <br style="line-height:5px;"/>
	<br style="line-height:5px;"/>
    <div style="padding:0.3em; text-align:center">
    	<input type="button" class="button" value="查看修改历史" onclick="javascript:amendHisty();" />
    	<rbac:hasPermission permStr="/admin/editPart1">
    		<input type="button" class="button" value="保 存" onclick="javascript:saveReMd();" />
    	</rbac:hasPermission>
		<input type="button" class="button" value="关 闭" onclick="javascript:history.back();" />
    </div>
	</div>
	</div>
</div>
</form>
<script type="text/javascript">
	window.onload=defaultLoadFunction();
	
	function defaultLoadFunction(){
		<%--genAssetsNum();--%>
		setModifyDate();
		
		/* Added by Doug on Oct19 */
		clearModifyReason();
	}
	
	 function amendHisty(){
		 var url = "${ctx}/admin/md/amend_histy_redict.jsp";
		 window.open (url,'newwindow','height=650,width=500,top=0,left=0,toolbar=no,menubar=no,scrollbars=no, resizable=yes,location=no, status=no');
	    }
	
    function saveReMd(){
   		if(checkMd()){
			var reMdForm=document.getElementById("modifyReForm");
	       	reMdForm.action="${ctx}/admin/updateRecord";
	       	reMdForm.submit();
       }
    }
	function checkMd(){
		var currStatus = document.getElementById("currStatus");
		var modifyResult = document.getElementById("modifyResult");
		var fiberNum = document.getElementById("fiberNum");
		var fiberLength = document.getElementById("fiberLength");
		var unitPrice = document.getElementById("unitPrice");
		/* var ip = document.getElementById("ip"); */
		var manDate = document.getElementById("manDate");
		var useDate = document.getElementById("useDate");
		//Added by Doug
		//var macAddr = document.getElementById("macAddr");
		
		if(checkNull(modifyResult)){
			alert("修改原因必须填写!");
			document.getElementById("modifyResult").focus();
			return false;
		}
		
		//null checking added by Doug on Sep24 coz after permission function is added, some elements don't have ID any more 
		if(null!=currStatus && checkNull(currStatus)){
			alert("当前状态必须选择!");
			document.getElementById("currStatus").focus();
			return false;
		}
		
		if(null!=fiberNum && !checkNull(fiberNum)) {
			if(! checkPositiveInt(fiberNum)){
				alert("光缆芯数必须是正整数!");
				document.getElementById("fiberNum").focus();
				return false;
			}
			
		}
		
		if(null!=fiberLength && !checkNull(fiberLength)) {
			if(! checkPositiveInt(fiberLength)){
			alert("光缆长度必须是正数!");
			document.getElementById("fiberLength").focus();
			return false;
			}
		
		}
		
		if(null!=unitPrice && !checkNull(unitPrice)) {
			if(! checkPrice(unitPrice)){
			alert("单价必须是正整数!");
			document.getElementById("unitPrice").focus();
			return false;
			}
		}
		
		/* if(!checkNull(ip)) {
			if(!checkIp(ip)) {
				alert("IP格式必须是 255.255.255.255!");
				document.getElementById("ip").focus();
				return false;
			}
		} */
		
		if(null!=manDate && !checkNull(manDate)) {
			if(!checkDate(manDate)) {
				alert("出厂日期格式必须是 yyyy-MM-dd!");
				document.getElementById("manDate").focus();
				return false;
			}
		}
		
		if(null!=useDate && !checkNull(useDate)) {
			if(!checkDate(useDate)) {
				alert("使用日期格式必须是 yyyy-MM-dd!");
				document.getElementById("useDate").focus();
				return false;
			}
		}
		
		//Added by Doug
		/* if(null!=macAddr && !checkNull(macAddr)) {
			if(!checkMac(macAddr)) {
				alert("mac地址格式不正确！mac地址格式为00:12:34:56:78:9A");
				document.getElementById("macAddr").focus();
				return false;
			}
		} */
		
		return true;
	}
	
	function setModifyDate() {
		var modifyDate = document.getElementById("modifyDate");
		var currDate = getCurrDate();
		var formatVal = formatDate(currDate);
		modifyDate.value = formatVal;
	}
	
	/* Added by Doug on Oct19 */
	function clearModifyReason() {
		var modifyResult = document.getElementById("modifyResult");
		modifyResult.value = '';
	}

		
</script>
</body>
</html>